package com.aat.dxfy.prop;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.util.Properties;


public class CsSdkPropUtilLoadUrl {
	private static Properties prop = new Properties();
	static {
		Properties prop = new Properties();
		try {
			URL url=new URL("");
			prop.load(url.openStream());
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (Exception e1) {
			e1.printStackTrace();
		}
	}

	private CsSdkPropUtilLoadUrl() {
	}

	public static String getStr(String key, String defultVal) {
		String val = prop.getProperty(key);
		if (val == null || val.length() == 0) {
			val = defultVal;
		}
		return val;
	}

	public static Integer getInt(String key, Integer defultVal) {
		String val = prop.getProperty(key);
		Integer intval = defultVal;
		if (val != null && val.length() > 0) {
			intval = Integer.parseInt(val);
		}
		return intval;
	}

	
}
